﻿@model IEnumerable<WI.CandidateManager.Common.Data.Entities.Coursework>

@{
    ViewBag.Title = @Resources.Common.CommonCourseworkList;
}

<h2>@Resources.Common.CommonCourseworkList</h2>

<p>@Html.ActionLink(@Resources.Common.CommonButtonCreateCoursework, "Create", "Courseworks", new {@class = "common-btn BlueColor"})</p>

<ul class="master-tab-wrap">
    <li class="master-tab-pushed">@Html.ActionLink(@Resources.Common.CommonTabMyCourseworks, "List", "Homeworks")</li>
    <li>@Html.ActionLink(@Resources.Common.CommonTabAllCourseworks, "AllList", "Courseworks")</li>
    <li>@Html.ActionLink("Pending List", "PendingList", "Courseworks")</li>
</ul>

<table class="bordered">
    <thead>
    <tr>
        <th>@Resources.Common.CommonButtonDetails</th>
        <th>@Resources.Common.CommonButtonEdit</th>
        <th>Assign</th>
        <th>@Resources.Common.CommonColumnCourseworkName</th>
        <th>@Resources.Common.CommonColumnOwner</th>
        <th>@Resources.Common.CommonButtonDelete</th>
    </tr>
    </thead>
    @foreach (var coursework in Model)
    {
        <tr>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Common.CommonButtonDetails, "Detail", new { @CourseworkId = coursework.Id }, new { @class="common-btn BlueColor" })</td>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Common.CommonButtonEdit, "Edit", new { @CourseworkId = coursework.Id }, new { @class = "common-btn BlueColor" })</td>
            <td class="Center column-detail">@Html.ActionLink("Assign", "Assign", new { @CourseworkId = coursework.Id }, new { @class = "common-btn BlueColor" })</td>
            <td>@coursework.Name</td>
            <td>@coursework.Owner.ShortName</td>
            <td class="Center column-delete">@Html.ActionLink(@Resources.Common.CommonButtonDelete, "Delete", new { @CourseworkId=coursework.Id }, new { @class="common-btn RedColor" })</td>
        </tr>        
    }
</table>
